#pragma once

#include "Keyboard.h"
#include "Player.h"
#include "Ball.h"
#include "VisualObject.h"
#include "Playfield.h"
#include "ScoreCounter.h"
#include "GameMode.h"
#include "PauseImage.h"
#include "SplashScreen.h"

class Game
{
public:
	Game(void);
	~Game(void);

	virtual void gameLoop()=0;
	void update(double time);
protected:
	int width;
	int height;
	int bpp;

	Keyboard* keyboard;
	GameMode *gamemode;
	VisualObjectProvider *visualObjectProvider;

	bool spaceKeyWasPressed;

	Player *leftPlayer, *rightPlayer;
	Ball *ball;
	Playfield* playfield;
	ScoreCounter *scorecounter;
	PauseImage *pauseimage;
	SplashScreen *splashscreen;

	virtual void drawObjects();
	void updatePlay(double time);
	void updateSplash(double time);



};
